home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / linux / xfree86 / Common / POSTINST.SH next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1998-01-07  |  3.6 KB  |  140 lines

  1. #!/bin/sh
  2.  
  3. # $XFree86: xc/programs/Xserver/hw/xfree86/etc/postinst.sh,v 3.13.2.4 1997/07/26 06:30:51 dawes Exp $
  4. #
  5. # postinst.sh (for XFree86 3.3.1)
  6. #
  7. # This script should be run after installing a new version of XFree86.
  8. #
  9.  
  10. RUNDIR=/usr/X11R6
  11.  
  12. if [ ! -d $RUNDIR/. ]; then
  13.     echo $RUNDIR does not exist
  14.     exit 1
  15. fi
  16.  
  17. # Since the misc fonts are distributed in two parts, make sure that the
  18. # fonts.dir file is correct if only one part has been installed.
  19. if [ -d $RUNDIR/lib/X11/fonts/misc ]; then
  20.     echo ""
  21.     echo "Updating the fonts.dir file in $RUNDIR/lib/X11/fonts/misc"
  22.     echo "This might take a while ..."
  23.     $RUNDIR/bin/mkfontdir $RUNDIR/lib/X11/fonts/misc
  24. fi
  25.  
  26. # Check if the system has a termcap file
  27. TERMCAP1DIR=/usr/share
  28. TERMCAP2=/etc/termcap
  29. if [ -d $TERMCAP1DIR ]; then
  30.     TERMCAP1=`find $TERMCAP1DIR -type f -name termcap -print 2> /dev/null`
  31.     if [ x"$TERMCAP1" != x ]; then
  32.         TERMCAPFILE="$TERMCAP1"
  33.     fi
  34. fi
  35. if [ x"$TERMCAPFILE" = x ]; then
  36.     if [ -f $TERMCAP2 ]; then
  37.         TERMCAPFILE="$TERMCAP2"
  38.     fi
  39. fi
  40. if [ x"$TERMCAPFILE" != x ]; then
  41.     echo ""
  42.     echo "You appear to have a termcap file: $TERMCAPFILE"
  43.     echo "This should be edited manually to replace the xterm entries"
  44.     echo "with those in $RUNDIR/lib/X11/etc/xterm.termcap"
  45.     echo ""
  46.     echo "Note: the new xterm entries are required to take full advantage"
  47.     echo "of new features, but they may cause problems when used with"
  48.     echo "older versions of xterm.  A terminal type 'xterm-r6' is included"
  49.     echo "for compatibility with the standard X11R6 version of xterm."
  50. fi
  51.  
  52. # Check for terminfo, and update the xterm entry
  53. TINFODIR=/usr/lib/terminfo
  54. OLDTINFO=" \
  55.     x/xterm \
  56.     x/xterms \
  57.     x/xterm-24 \
  58.     x/xterm-vi \
  59.     x/xterm-65 \
  60.     x/xterm-bold \
  61.     x/xtermm \
  62.     x/xterm-boldso \
  63.     x/xterm-ic \
  64.     x/xterm-r6 \
  65.     x/xterm-old \
  66.     x/xterm-r5 \
  67.     v/vs100"
  68.     
  69. if [ -d $TINFODIR ]; then
  70.     echo ""
  71.     echo "You appear to have a terminfo directory: $TINFODIR"
  72.     echo "New xterm terminfo entries can be installed now."
  73.     echo ""
  74.     echo "Note: the new xterm entries are required to take full advantage"
  75.     echo "of new features, but they may cause problems when used with"
  76.     echo "older versions of xterm.  A terminal type 'xterm-r6' is included"
  77.     echo "for compatibility with the standard X11R6 version of xterm."
  78.     echo ""
  79.     echo "Do you wish to have the new xterm terminfo entries installed now (y/n)?"
  80.     read Resp
  81.     case "$Resp" in
  82.     [yY]*)
  83.         echo ""
  84.         for t in $OLDTINFO; do
  85.             if [ -f $TINFODIR/$t ]; then
  86.                 echo "Moving old terminfo file $TINFODIR/$t to $TINFODIR/$t.bak"
  87.                 rm -f $TINFODIR/$t.bak
  88.                 mv -f $TINFODIR/$t $TINFODIR/$t.bak
  89.             fi
  90.         done
  91.         echo ""
  92.         echo "Installing new terminfo entries for xterm."
  93.         echo ""
  94.         echo "On some systems you may get warnings from tic about 'meml'"
  95.         echo "and 'memu'.  These warnings can safely be ignored."
  96.         echo ""
  97.         tic /usr/X11R6/lib/X11/etc/xterm.terminfo
  98.         ;;
  99.     *)
  100.         echo ""
  101.         echo "Not installing new terminfo entries for xterm."
  102.         echo "They can be installed later by running:"
  103.         echo ""
  104.         echo "  tic /usr/X11R6/lib/X11/etc/xterm.terminfo"
  105.         ;;
  106.     esac
  107. fi
  108.  
  109. if [ -f /usr/X11R6/bin/rstartd ]; then
  110.     echo ""
  111.     echo "If you are going to use rstart and /usr/X11R6/bin isn't in the"
  112.     echo "default path for commands run remotely via rsh, you will need"
  113.     echo "a link to rstartd installed in /usr/bin."
  114.     echo ""
  115.     echo "Do you wish to have this link installed (y/n)?"
  116.     read Resp
  117.     case "$Resp" in
  118.     [yY]*)
  119.         echo "Creating link from /usr/X11R6/bin/rstartd to /usr/bin/rstartd"
  120.         rm -f /usr/bin/rstartd
  121.         ln -s /usr/X11R6/bin/rstartd /usr/bin/rstartd
  122.         ;;
  123.     esac
  124. fi
  125.  
  126. case `uname` in
  127.     FreeBSD|NetBSD|OpenBSD)
  128.         echo ""
  129.         echo "Running ldconfig"
  130.         /sbin/ldconfig -m /usr/X11R6/lib
  131.         ;;
  132.     Linux)
  133.         echo ""
  134.         echo "Running ldconfig"
  135.         /sbin/ldconfig /usr/X11R6/lib
  136.         ;;
  137. esac
  138.  
  139. exit 0
  140.